module.exports = class extends think.Logic {
  putAction() {
    const rules = {
      // name: {
      //   string: true,
      //   required: true
      // },
      type: {
        string: true,
        required: false
      }
    };
    const msgs = {
      // name: '必须指定配置项目名称',
      type: '配置项目类型只能是字符串，默认为空字符串'
    };
    const flag = this.validate(rules, msgs);
    if (!flag) {
      return this.fail(1001, 'validate error', this.validateErrors);
    }
  }
};
